/**
    @project {
        "templateId": "org.helgoboss.custom",
        "version": "0.1-SNAPSHOT",
        "dependencies": [
            "org.scala-lang:scala-library:2.9.0-1",
            "org.helgoboss:osgi-additions:0.1-SNAPSHOT"
        ]
    }
*/

package org.helgoboss.system_property_setter

import org.helgoboss.osgi_additions._

class Activator extends OsgiContext with OsgiProvider with OsgiConfigurationWatcher {
    whenBundleActive {   
        whenConfigurationUpdated("org.helgoboss.system_property_setter") { conf =>
            conf.foreach {
                _.foreach { case (key, value) =>
                    System.setProperty(key.toString, value.toString)
                }
            }
        }
    }
}
